<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php echo $this->set_css('managecp.css', 'admin');?>" type="text/css" media="all" />

<script language="javascript" src="pframe/editor/image/editor/wind_c_editor.js"></script>
<script language="javascript" src="pframe/editor/image/editor/script_common.js"></script>
<script language="javascript" src="pframe/editor/image/editor/editor_function.js"></script>
<script language="javascript">
//Ctrl+Enter 发布
function ctrlEnter(event, btnId, onlyEnter) {
	if(isUndefined(onlyEnter)) onlyEnter = 0;
	if((event.ctrlKey || onlyEnter) && event.keyCode == 13) {
		$(btnId).click();
	}
}
function isUndefined(variable) {
	return typeof variable == 'undefined' ? true : false;
}

</script>

<meta content="Comsenz Inc." name="Copyright" />
</head>
<body scroll="no">
<div class="container">
    <h3><a href="?c=threads">内容列表</a> 添加内容</h3>
 		<form action="?c=threads&a=insert" method="post">
			<table class="datalist fixwidth" style="width:100%;">
				<?php if ($uid === 0 || $fid ===0):?>
				<tr>
					<td>标题</td>
					<td>
					 <input type="text" name="title" value="" size="60">
					</td>
				</tr>
				<tr>
					<td>分类</td>
					<td><select name="fid">
					<?php foreach($fid_array as $key=>$val):?>
					<option value="<?php echo $key?>" <?php if ($key == $fid) echo 'selected=selected'?>>
						<?php echo $val?>
					</option>
					<?php endforeach;?>
					</select></td>
				</tr>
				<tr>
					<td>简介</td>
					<td>
					<textarea class="userData" name="msg" style="width:800;border: 1px solid #C5C5C5;" ></textarea>
					</td>
				</tr>
				<?php endif;?>
				<tr>
					<td>内容</td>
					<td>
					<textarea class="userData" name="content" id="uchome-ttHtmlEditor" style="height:100%;width:100%;display:none;border:0px">
					</textarea>
					<iframe src="pframe/editor/editor.php?charset=utf8&allowhtml=1" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:800;border: 1px solid #C5C5C5;" height="1000"></iframe>
					</td>
				</tr>
				<tr>
					<td>用户</td>
					<td><select name="userinfo">
					<?php foreach ($user_list as $key=>$val):?>
					<option value="<?php echo $val['uid']?>|<?php echo $val['username']?>" 
					<?php if ($val['uid'] == $uid) echo 'selected=selected'?>>
					 <?php echo $val['username']?>
					</option>
					<?php endforeach;?>
					</select></td>
				</tr>
				<tr>
					<td></td>
					<td>
					<input type="hidden" name="uid" value="<?php echo $uid?>">
					<input type="hidden" name="tid" value="<?php echo $tid?>">
					<input type="hidden" name="hfid" value="<?php echo $fid?>">
					<input type="submit" name="fieldsubmit" value="提交" class="submit"  onclick="edit_save();">
					</td>
				</tr>
			</table>
		</form>
    </div>
    
</div>
</body>
</html>
